import type { Router } from 'vue-router';
import { setRouteEmitter } from '@/utils/route-listener.ts';

// 全局路由事件
export function createRouteListenerGuard(router: Router) {
  router.beforeEach(async (to) => {
    setRouteEmitter(to);
  });
}
